home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2002 #11 / Amiga Plus CD - 2002 - No. 11.iso / Tools / MorphOS / Epic4_mos / share / epic / script / time < prev    next >
Encoding:
Text File  |  2002-10-28  |  750 b   |  43 lines

  1. # This will put the current time, date, etc according to your server
  2. # in the appropriate variables
  3. alias servertime {
  4.     stack push on 391
  5.     ^on ^391 * {
  6.         @ day = [$2]
  7.         @ month = [$3]
  8.         @ date = [$4]
  9.         @ time = [$7]
  10.     }
  11.     time
  12.     wait
  13.     stack pop on 391
  14. }
  15.  
  16.  
  17. # This will get the time from the uptime program and put it in the 
  18. # variable uptime
  19. on ^exec "uptime *" {
  20.     @ uptime = [$1]
  21. }
  22. on ^exec_exit "uptime"
  23. alias uptime {
  24.     exec -name uptime uptime
  25.     wait %uptime
  26. }
  27.  
  28. # This will get the time, date, etc from the date program and
  29. # put them in the appropriate variables.
  30. on ^exec "date % % % *" {
  31.     @ day = [$1]
  32.     @ month  = [$2]
  33.     @ date = [$3]
  34.     @ time = [$4]
  35. }
  36. on ^exec_exit "date"
  37. alias datetime {
  38.     exec -name date date
  39.     wait %date
  40. }
  41.  
  42. #modernized by hop'95
  43.